import cv2
import matplotlib.pyplot as plt
import numpy as np
 
o = cv2.imread("/Users/mac/Documents/Learning/LearningOpencv/datasets/1.jpg", cv2.IMREAD_GRAYSCALE)  # 直接以灰度图方式读入

 
r1=cv2.Canny(o,128,200) 
r2=cv2.Canny(o,32,128) 
cv2.imshow("original", o) 
cv2.imshow("result1", r1) 
cv2.imshow("result2", r2) 
cv2.waitKey() 
cv2.destroyAllWindows() 
